Lge = new function(){};
Lge.RefreshRate = 50;//1;
Lge.QualityRate = 1;//0.01;

/*
*	1) yuvarlakalar carpy?syn
*	2) bound ekle
*	3) bound collision
*	4) box collision
*	5) spring
*/

/**************************************** LGE MAIN METHODS *****************************************/
Lge.init = function(){
	if(Lpe != undefined ) Lpe.init(); else alert("Physics Engine Missing");
	if(Lgre != undefined ) Lgre.init(); else alert("Graphics Engine Missing");
	Lge.preSet();
	setInterval('Lge.refresh()',Lge.RefreshRate);
};

Lge.items=[];
Lge.addItem = function(item){
	this.items.push(item);
};

Lge.refresh = function(){
	Lpe.refresh();
	Lgre.refresh();
};

Lge.preSet = function(){/*should be overwritten*/};

/**************************************** INCLUDE METHODS ******************************************/
function includeJS(jsPath){
  var script = document.createElement("script");
  script.setAttribute("type", "text/javascript");
  script.setAttribute("src", jsPath);
  document.getElementsByTagName("head")[0].appendChild(script);
};

function includeCSS(cssPath){
  var link = document.createElement("link");
  link.setAttribute("type", "text/css");
  link.setAttribute("rel", "stylesheet");
  link.setAttribute("href", cssPath);
  document.getElementsByTagName("head")[0].appendChild(link);
};

includeCSS("lge/engine/lge.css");//-------------lge:=  levent game engine -css
includeJS("lge/engine/particle/lpre.js");//-----lpre:= levent particle engine
includeJS("lge/engine/physics/lpe.js");//-------lpe:=  levent physics engine
includeJS("lge/engine/graphics/lgre.js");//-----lgre:= levent graphics engine
includeJS("lge/engine/tools.js");//-------------toooooools
